<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
 
<script type="text/javascript" src="${contextPath}/resources/lib/jquery/1.9.1/jquery.js"></script>
 
    <div class="zp_pop">
    <form method="post" name="query_order_form"  id="query_order" action="${contextPath}/letter/letter_insert" >    
        <table class="table table-border table-bordered table-bg">
 
            <tr class="text-c">
                <td style="text-align: right ;">
                 	 标题 :
                </td>
                 <td style="text-align: left;">
                   <input   style="width: 240px" class="input-text  radius" type="text" id="title"  name="title"/>
                </td>
            </tr>
            <tr class="text-c">
                <td style="text-align: right ;">
                 	 收信人卡号:
                </td>
                 <td style="text-align: left;">
                   <input style="width: 240px" class="input-text  radius" type="text" id="memberNo"  name="memberNo"/>
                </td>
                
            </tr>
           <tr class="text-c">
                <td style="text-align: right ;">
                 	 内容:
                </td>
                 <td style="text-align: left;">
                 	<textarea rows="4" cols="50" id="text_temp"></textarea>
                   <input  type="hidden" id="content"  name="content" value=""/>
                </td>
            </tr>
          
            <tr > 
            <td colspan="2" style="text-align: right ;" > <button type="button" class="btn btn-success"   onclick="addform()" ><i class="Hui-iconfont">&#xe600;</i> 添加</button>
            </td>
            </tr>
        </table>     
           </form>
         
    </div>
<@frame.end "default">
</@frame.end>
<script type="text/javascript">
function addform() {
	var title =$("#title").val();
	var receiverMemberNo =$("#receiverMemberNo").val();
	var content =$("#text_temp").val();
	$("#content").val(content); 
	if(title==""  ){
		layer.msg('标题不能为空!',{icon:1,time:1000},function(){
			return ;
		});
		return ;
	}
	if(receiverMemberNo==""  ){
		layer.msg('标题不能为空!',{icon:1,time:1000},function(){
			return ;
		});
		return ;
	}
	if(content==""  ){
		layer.msg('标题不能为空!',{icon:1,time:1000},function(){
			return ;
		});
		return ;
	}
	
	$("#query_order").ajaxSubmit({
		dataType : 'html',
        success: function(message){
        		if(message == "200"){
                    layer.msg('操作成功!',{icon:1,time:1000},function(){
/*                     var index = parent.layer.getFrameIndex(window.name);
                        parent.query_brand_form.submit();
                        parent.layer.close(index); */
                    	var index = parent.layer.getFrameIndex(window.name);
                  		parent.layer.close(index);
                    });
 				}else if(message == "500"){
 					layer.alert("系统繁忙！");
 				}else{
 					layer.alert(message);
 				}
        },
        error: function(){
            layer.msg('操作失败!',{icon:5,time:1000});
        }
    });
	//$("#query_order").submit();
	
	
}

</script>
 
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/letter/letter_insert.js"></script>
 